<template>
	<view>
		<scroll-view class="list-con-right" v-if="collection_list.length!=0" :style='{height:height+"rpx"}'
			:scroll-y="true" @scrolltolower="scrolltolower">
			<List mode="listthree" v-for="(item,index) in collection_list" leftColor="#B31616" :leftfontSize="36"
				:index="index" :Data="item" :marginBottom="40" @click.native="goDetalis(item)"></List>
		</scroll-view>
		<view class="empty" :style='{height:height+"rpx"}' v-else>
			<Empty mode="list"></Empty>
		</view>
	</view>
</template>

<script>
	import List from "../../../components/bw-lists/bw-lists.vue";
	import Empty from "../../../components/bw-Empty/bw-Empty"
	import {
		collection,collection_del
	} from '../../../api/mine.js'
	export default {
		components: {
			List,
			Empty
		},
		data() {
			return {
				collection_list: [], //收藏产品列表	
							height:0,
			}
		},

		onLoad() {
			this.getcollectionlist()
		},
		methods: {
			getcollectionlist() {
				collection().then(res => {
					if (res.status == 200) {
						console.log('coll', res)
						
							this.collection_list = res.data.data
					}
				})
			},
			scrolltolower() {
				//监听滚动条
				if (this.pagelist.current_page + 1 <= this.pagelist.last_page) {
					this.switchPage(true)
				} else {
					uni.showToast({
						title: "没有更多数据啦",
						icon: "none"
					})
				}
			},

		}
	}
</script>

<style>

</style>
